package com.ccoffers.model.cardinfo.shopping;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.ccoffers.model.cardinfo.CreditCardCompany;
import com.ccoffers.model.cardinfo.CreditCardType;
import com.ccoffers.model.shopping.Merchant;
import com.ccoffers.model.shopping.ShoppingCategory;

@Entity
@Table(name="CREDIT_CARD_OFFER")
public class CreditCardOffer implements Serializable{

	private static final long serialVersionUID = 6431344443299177018L;
	@Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "ID", nullable = false)
	private Long id;
	@Column(name = "VALID_UPTO")
	private Calendar validUpto;
	@Column(name = "OFFER_TEXT")
	private String offerText;
	@Column(name = "TANDCURL")
	private String termsAndConditionsURL;
	@ManyToOne
	@JoinColumn(name = "CREDIT_CARD_TYPE_ID")
	private CreditCardType creditCardType;
	@ManyToOne
	@JoinColumn(name = "CREDIT_CARD_COMPANY_ID")
	private CreditCardCompany creditCardCompany;
	@ManyToOne
	@JoinColumn(name = "MERCHANT_ID")
	private Merchant merchant;
	@ManyToOne
	@JoinColumn(name = "SHOPPING_CATEGORY_ID")
	private ShoppingCategory shoppingCategory;


	public String getOfferText() {
		return offerText;
	}

	public void setOfferText(String offerText) {
		this.offerText = offerText;
	}

	public Calendar getValidUpto() {
		return validUpto;
	}

	public void setValidUpto(Calendar calendar) {
		this.validUpto = calendar;
	}

	public String getTermsAndConditionsURL() {
		return termsAndConditionsURL;
	}

	public void setTermsAndConditionsURL(String termsAndConditionsURL) {
		this.termsAndConditionsURL = termsAndConditionsURL;
	}

	public CreditCardType getCreditCardType() {
		return creditCardType;
	}

	public void setCreditCardType(CreditCardType creditCardType) {
		this.creditCardType = creditCardType;
	}

	public CreditCardCompany getCreditCardCompany() {
		return creditCardCompany;
	}

	public void setCreditCardCompany(CreditCardCompany creditCardCompany) {
		this.creditCardCompany = creditCardCompany;
	}

	public ShoppingCategory getShoppingCategory() {
		return shoppingCategory;
	}

	public void setShoppingCategory(ShoppingCategory shoppingCategory) {
		this.shoppingCategory = shoppingCategory;
	}

	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	
}
